<template>
    <div class="hot-clubs-box" @click="goClubs">
        <p class="hot-clubs-name">{{ data.name }}</p>
        <div class="hot-clubs-bottom">
            <div class="hot-clubs-img-box">
                <img class="hot-clubs-img" :src="data.logo" alt="">
            </div>
            <div class="hot-clubs-tip">
                <p class="hot-clubs-description">{{ data.description }}</p>
                <div class="hot-clubs-place-box">
                    <p class="hot-clubs-place">{{ data.place }}</p>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: "HotClubs",
    props: {
        data: {
            type: Object,
            default: () => { }
        },
    },
    methods: {
        goClubs() {
            this.$router.push(`/clubsDetails?id=${this.data.id}`)
        }
    }
}
</script>

<style scoped>
.hot-clubs-box {
    flex: 1;
    min-width: 350px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    cursor: pointer;
}

.hot-clubs-box:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.hot-clubs-name {
    font-size: 18px;
    color: #333;
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid #eee;
}

.hot-clubs-bottom {
    display: flex;
    padding: 20px;
    gap: 15px;
}

.hot-clubs-img-box {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.hot-clubs-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.hot-clubs-img:hover {
    transform: scale(1.05);
}

.hot-clubs-tip {
    flex: 1;
    min-width: 0;
}

.hot-clubs-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 15px 0;
}

.hot-clubs-place-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-clubs-place {
    background: #e6f4ff;
    color: #1677ff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

@media (max-width: 768px) {
    .hot-clubs-box {
        width: 100%;
    }
    
    .hot-clubs-bottom {
        flex-direction: column;
    }
    
    .hot-clubs-img-box {
        width: 100%;
        height: 200px;
    }
}
</style>